import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86185
 * Date: 2023-10-15
 * Time: 22:19
 */
public class Exam1015 {
    public static void main(String[] args) {
        //xcopy /s "c:\\ file" "d:\\e"

        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        String[] strings;
        int flag = 0;
        ArrayList<String> arrayList = new ArrayList<>();
        while (true) {
            if(s.contains("\"")) {
                String s1 = s.substring(0, s.indexOf("\""));
                String s2 = s.substring(s.indexOf("\""), s.indexOf("\"", s.indexOf("\"") + 1) + 1);
                String s3 = s.substring(s.indexOf("\"", s.indexOf("\"") + 1) + 1, s.length());
                strings = s1.split(" ");
                arrayList.addAll(Arrays.asList(strings));
                s2 = s2.substring(1, s2.length() - 1);
                if(s2.length() != 0)
                    arrayList.add(s2);
                s = s3;
            } else {
                if(s.length() != 0) {
                    arrayList.addAll(Arrays.asList(s.split(" ")));
                }
                break;
            }
        }
        System.out.println(arrayList.size());
        for (String t : arrayList) {
            System.out.println(t);
        }
    }
}
